<%@page import="java.util.List"%>
<%@page import="com.vizaysoni.Student"%>
<%@ page language="java" contentType="text/html; charset=ISO-8859-1"
    pageEncoding="ISO-8859-1"%>
<!DOCTYPE html PUBLIC "-//W3C//DTD HTML 4.01 Transitional//EN" "http://www.w3.org/TR/html4/loose.dtd">
<html>
<head>
<meta http-equiv="Content-Type" content="text/html; charset=ISO-8859-1">
<title>Showing Records</title>
</head>
<body>

<h3 align="center"> Student Record </h3>
<span align="right"> <a href="javascript:history.back()">  Back </a> </span>

<HR />


<table border="1" align="center">
<tr>
	<th> Key  </th>
	<th> Name </th>
	<th> Email  </th>
	<th> Roll No.  </th>
	<th> Age  </th>
</tr>


<% 
	
	List<Student> list = (List<Student>)request.getAttribute("studentList");
	
	for(Student student : list)
	{	
		//System.out.println("[###] " + student.getName());
%>

<tr>
	<td> <a href="RetrieveStudentServlet?key=<%=student.getKey().getId()%>"> <%= student.getKey() %> </a>  </td>
	<td> <%= student.getName() %> </td>
	<td> <%= student.getEmailId() %> </td>
	<td> <%= student.getRollNo() %> </td>
	<td> <%= student.getAge() %> </td>
</tr>

<% } %>

</table>


</body>
</html>